/**
 * Framework for batch testing user profile models
 * Final project by Sergey Nepomnyachiy and Julia Polchin
 * Supervisor: Tsvi Kuflik
 *
 */
package core.generators;

/**
 * Generates Fibbonaci numbers - proof of concept
 * 
 * @author Sergey&Julia
 * 
 */
public class FibbonaciGenerator extends FunctionGenerator<Integer> {

	/**
	 * Constructs the F. generator
	 * 
	 * @param left
	 *            Stub value
	 */
	public FibbonaciGenerator(Object left) {
		super(left);
	}

	@SuppressWarnings("boxing")
	@Override
	Integer function(int index) {
		if (index > 1)
			return this.vector.elementAt(index - 1)
					+ this.vector.elementAt(index - 2);
		return 1;
	}

}
